package com.jimiopen.common.utils.bubble;

public class Bubble {
	public static void bubbleMain(int[] array) {
		int temp;
		for (int i = 0; i < array.length; i++) {
			for (int j = 0; j < array.length - 1; j++) {
				if (array[i] > array[j]) {
					temp = array[i];
					array[i] = array[j];
					array[j] = temp;
				}
			}
		}
		for (int i = 0; i < array.length; i++) {
			System.out.print(array[i] + "|");
		}
	}

	public static void main(String[] args) {
		int[] array = { 1, 23, 45, 65, 99, -13, 0 };
		bubbleMain(array);
	}
}
